package org.testis.terminalapplicationmodule.services;

import org.testis.data.TestStepDataObject;
import org.testis.data.parser.AtofModuleParameterNames;
import org.testis.services.AtofModuleService;
import org.testis.services.AtofModuleTask;
import org.testis.terminalapplicationmodule.data.TerminalApplicationModuleDataObject;


public class TerminalApplicationModuleTask extends AtofModuleTask
{

    public TerminalApplicationModuleTask(TestStepDataObject dataObj,
                                         AtofModuleService service)
    {
        super(dataObj,
              service);
    }


    @Override
    public void afterExecute()
    {
        TerminalApplicationModuleDataObject dobj =
            (TerminalApplicationModuleDataObject) m_service.getDataObj();
        m_result.getReturnValueList().put(AtofModuleParameterNames.TAM_EXIT_CODE,
                                        dobj.getExitCode());
        m_result.getReturnValueList().put(
            AtofModuleParameterNames.TAM_OUTPUT_STRING,
            dobj.getOutputString());
        m_result.getReturnValueList().put(
            AtofModuleParameterNames.TAM_ERROR_STRING,
            dobj.getErrorString());
        super.afterExecute();

    }
}
